#include  <cstdio>
#include  <cstring>
#include  <iostream>
#include  <algorithm>
#include  <functional>
using namespace std;

int n,flag[100];
double a[100];

bool dfs(int start, double l, double u)
{
	for( int i = start; i < n ; ++i )
	{
		if(a[i] <= u && a[i] >= l)
		{
			flag[i] = 1;
			return true;
		}
		else if( a[i] < l)
		{
			flag[i] = 1;
			if(dfs(i+1,l-a[i],u-a[i]))
				return true;
			else
				flag[i] = 0;
		}
	}

	return false;
}

int main(int argc, char *argv[])
{
	while( scanf("%d",&n) && n != 0 )
	{
		memset(flag,0,100*4);
		double sum = 0.0;
		for( int i = 0; i < n ; ++i )
		{
			scanf("%lf",&a[i]);
			sum += a[i];
		}
		double x = sum/2.02;

		dfs(0,x,x*1.02);
		int i = 0;
		while(flag[i] == 0) i++;
		printf("%d",i+1);
		i++;
		for(   ; i < n ; ++i )
			if(flag[i] == 1)
				printf(" %d",i+1);
		printf("\n");
	}
}
